import request from './request'
// 查询店铺信息
export const getInfo = (storeId) =>{
  return request({
    method: 'get',
    url: 'mall/store/storeInfo',
    params:{
      storeId
    }
  })
}
// 加入购物车
export const cartadd = (productId)=> {
  return request({
    method:'post',
    url:'mall/cartitem/add',
    params:{
      productId
    },
    headers:{
      token:`${localStorage.getItem('token')}`
    }
  })
}
// 查询商品信息
export const getproductInfo = (id) =>{
  return request({
    method: 'get',
    url: 'mall/product/getProductInfo',
    params:{
      id
    }
  })
}

// 加入我的收藏
export const collect = (productId,memberId)=> {
  return request({
    method:'post',
    url:'mall/productfavorite/likeProduct',
    data:{
      productId,
      memberId
    },
  })
}

// 查看收藏商品
export const showcollect = (id)=> {
  return request({
    method:'get',
    url:'mall/productfavorite/seeLikeProduct',
    params:{
      id
    },
  })
}